package 练习增删改操作;

/**
 * @作者:侯国威
 * @时间: 2020/4/15/19:15
 * @邮箱:1045077189@qq.com
 */
public class student_info {

    private int id;
    private String name;
    private String classid;
    private String phone;
    private String number;
    private String dormitory;
    private String grade;

    public student_info() {
    }

    public student_info(int id, String name, String classid, String phone, String number, String dormitory, String grade) {
        this.id = id;
        this.name = name;
        this.classid = classid;
        this.phone = phone;
        this.number = number;
        this.dormitory = dormitory;
        this.grade = grade;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClassid() {
        return classid;
    }

    public void setClassid(String classid) {
        this.classid = classid;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getDormitory() {
        return dormitory;
    }

    public void setDormitory(String dormitory) {
        this.dormitory = dormitory;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    @Override
    public String toString() {
        System.out.println("=============查询结果=============");
        return info();

    }

    public String info() {

        return
                "\nid:" + "\t" + id +
                        "\n 姓名:" + " " + name +
                        "\n 班级:" + " " + classid +
                        "\n 联系电话:" + " " + phone +
                        "\n 学号:" + " " + number +
                        "\n 寝室号:" + " " + dormitory +
                        "\n 成绩:" + " " + grade +
                        "\n =================================" ;


    }
}
